import java.util.Hashtable;

class DataHub {
    private Hashtable DataBuffer = new Hashtable();
    private Logger log = new Logger("logs/datahub.log");
    
    public void addPack(Pack p) {
        DataBuffer.put(p.toAddr, p);
        log.log("Added pack to data hub pack details follow:");
        log.log(p.toString());
    }
    
    public Pack getMyData(String myIP) {
        return (Pack) DataBuffer.get(myIP);
    }

}
